<include file="public:top" />
<!--网站设置-->
<body class="body">
<style type="text/css">
    .red {color: #FF5722!important;}
    .green {color: #5FB878!important;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
<div class="my-btn-box">
  <span class="fl">
     <blockquote class="layui-elem-quote">说明：选择<span class="layui-bg-red">置顶</span>后，专辑将显示到首页  </blockquote>
  </span>
  <span class="fr">
       <a class="layui-btn layui-btn-normal" id="btn-add">添加专辑</a>
     </span>
</div> 
<form class="layui-form layui-form-pane" action="">
    <table class="layui-table">
        <colgroup>
            <col width="60">
            <col width="">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="150">
            <col width="100">
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>专辑名称</th>
            <th>文档数量</th>
            <th>置顶</th>
            <th>是否启用</th>
            <th>添加时间</th>
            <th>管理操作</th>
        </tr>
        </thead>
         <tbody id="userList">
            <volist name="list" id="val" >
              <tr>
                <td>{$val.id}</td>
                <td>{$val.title}</td>
                <td>{$val.wds}</td>
                <td>
                    <input type="checkbox" name="status" value="{$val.status}" data-uri="{:U('zj/ajax_edit',array('field'=>'zhiding','id'=>$val['id']))}" lay-skin="switch" lay-filter="status" lay-text="置顶|禁止" <if condition="$val.zhiding eq 1">checked </if>>
                </td>
                <td>
                    <input type="checkbox" name="status" value="{$val.status}" data-uri="{:U('zj/ajax_edit',array('field'=>'status','id'=>$val['id']))}" lay-skin="switch" lay-filter="status" lay-text="启用|禁止" <if condition="$val.status eq 1">checked </if>>
                </td>
                <td>{$val.add_time|date='Y-m-d H:i',###}</td>
                 <td>
                <a href="javascript:void(0);" class="J_showdialog" data-uri="{:U('zj/edit', array('id'=>$val['id']))}" data-title="{:L('edit')} - {$val.name}" data-id="edit" id="edit">{:L('edit')}</a> | 
                <a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('zj/delete', array('id'=>$val['id']))}" data-msg="{:sprintf(L('confirm_delete_one'),$val['name'])}" id="delete">{:L('delete')}</a></td>

                </td>
              </tr>
            </volist>
        </tbody>

    </table>
</form>
<div id="test-laypage-demo0">
  <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-29">
  {$page}
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
layui.use(['layer','jquery','form','element','table'], function () {
    //参数：layui、名称、模块名、主键（删除用）
    //新增弹窗
    Oper.config.add.width = '600px';
    Oper.config.add.height = '560px';

    //编辑弹窗
    Oper.config.edit.width = '600px';
    Oper.config.edit.height = '560px';
    Oper.initList(layui, '专辑', 'zj', 'id');
});
</script>
</body>
</html>